package com.ruoyi.project.system.statistics.service.impl;

import java.util.HashMap;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.statistics.mapper.AgainstStatisticsMapper;
import com.ruoyi.project.system.statistics.domain.AgainstStatistics;
import com.ruoyi.project.system.statistics.service.IAgainstStatisticsService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-13
 */
@Service
public class AgainstStatisticsServiceImpl implements IAgainstStatisticsService 
{
    @Autowired
    private AgainstStatisticsMapper againstStatisticsMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public AgainstStatistics selectAgainstStatisticsById(Long id)
    {
        return againstStatisticsMapper.selectAgainstStatisticsById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param againstStatistics 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<AgainstStatistics> selectAgainstStatisticsList(AgainstStatistics againstStatistics)
    {
        return againstStatisticsMapper.selectAgainstStatisticsList(againstStatistics);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param againstStatistics 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertAgainstStatistics(AgainstStatistics againstStatistics)
    {
        againstStatistics.setCreateTime(DateUtils.getNowDate());
        return againstStatisticsMapper.insertAgainstStatistics(againstStatistics);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param againstStatistics 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateAgainstStatistics(AgainstStatistics againstStatistics)
    {
        return againstStatisticsMapper.updateAgainstStatistics(againstStatistics);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteAgainstStatisticsByIds(String ids)
    {
        return againstStatisticsMapper.deleteAgainstStatisticsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteAgainstStatisticsById(Long id)
    {
        return againstStatisticsMapper.deleteAgainstStatisticsById(id);
    }

    @Override
    public List<AgainstStatistics> selectAll(AgainstStatistics againstStatistics) {
        return againstStatisticsMapper.selectAll(againstStatistics);
    }

    @Override
    public List<AgainstStatistics> selectParticulars(AgainstStatistics againstStatistics, HashMap<String,String> map) {
        return againstStatisticsMapper.selectParticulars(againstStatistics,map);
    }

//    @Override
//    public List<AgainstStatistics> selectParticulars(String accountNumber) {
//        return againstStatisticsMapper.selectParticulars(accountNumber);
//    }

    @Override
    public Integer selectAccountCount(AgainstStatistics againstStatistics) {
        return againstStatisticsMapper.selectAccountCount(againstStatistics);
    }

    @Override
    public String yesterdayEarnings() {
        return againstStatisticsMapper.yesterdayEarnings();
    }

    @Override
    public String todayEarnings(AgainstStatistics againstStatistics) {
        return againstStatisticsMapper.todayEarnings(againstStatistics);
    }

    @Override
    public String allEarnings(AgainstStatistics againstStatistics) {
        return againstStatisticsMapper.allEarnings(againstStatistics);
    }

    @Override
    public List<AgainstStatistics> selectAgainstStatisticsByUserName(AgainstStatistics againstStatistics) {
        return againstStatisticsMapper.selectAgainstStatisticsByUserName(againstStatistics);
    }

    @Override
    public String yesterdayEarningsByUserName(String userName) {
        return againstStatisticsMapper.yesterdayEarningsByUserName(userName);
    }

    @Override
    public String todayEarningsByUserName(String userName) {
        return againstStatisticsMapper.todayEarningsByUserName(userName);
    }

    @Override
    public AgainstStatistics allEarningsByTime(AgainstStatistics againstStatistics) {
        return againstStatisticsMapper.allEarningsByTime(againstStatistics);
    }

    @Override
    public String selectHmeByTime(AgainstStatistics againstStatistics) {
        return againstStatisticsMapper.selectHmeByTime(againstStatistics);
    }

}
